<h2>Add <?php echo $records['name']?> leave quota <hr/></h2>
<?php echo isset($_GET['message'])?$_GET['message']?'Added Compensation leave quota successful!':'Added Compensation leave quota failed':'';?>
 <form name="frmSummary" id="frmSummary" method="post" action="?leavecode=Leave&action=add_ex_leave_save">
    <input type="hidden" name="txtLeaveTypeName" value="<?php echo $records['name']?>"/>
    <input type="hidden" name="txtEmployeeId" value="<?php echo $records['empId']?>"/>
    <input type="hidden" name="txtLeaveTypeId" value="<?php echo $records['leaveTypeId'] ?>" />
    <input type="hidden" name="year" value="<?php echo $records['year'] ?>" />       
    <table id="leave_quota" border="0" cellpadding="0" cellspacing="0">
        <thead>
            <tr>
                <th class="tableTopLeft"></th>                    
                <th class="tableTopMiddle"></th>
                <th class="tableTopMiddle"></th>                    
                <th class="tableTopRight"></th>
            </tr>                
        </thead>

        <tbody>            
                <tr>
                    <td class="tableMiddleLeft"></td>                        
                    <td>
                        <?php echo $records['name'] ?>
                    </td>                        
                    <td>
                        <input type="text" name="txtLeaveEntitled" value=""/>
                    </td>                        
                    <td class="tableMiddleRight"></td>
                </tr>
                <tr>
                    <td class="tableMiddleLeft"></td>                        
                    <td><input type ="button" onclick="javascript:back();" value="Back"/></td>                        
                    <td>
                        <input type="submit" value="save"/>
                    </td>                        
                    <td class="tableMiddleRight"></td>
                </tr>
        </tbody>
        <tfoot>
            <tr>
                <td class="tableBottomLeft"></td>                    
                <td class="tableBottomMiddle"></td>
                <td class="tableBottomMiddle"></td>
                <td class="tableBottomRight"></td>
            </tr>
        </tfoot>
    </table>    
</form>
<script type="text/javascript">
	function back() {
            var year = document.frmSummary.year.value;
            var cmbId = document.frmSummary.year.value;
            var id = document.frmSummary.txtEmployeeId.value;
            //var leaveTypeId = document.frmSummary.txtLeaveTypeId.value;
            location.href = "?leavecode=Leave&action=Leave_Summary"+'&searchBy=employee'+'&year='+year+'&cmbId='+cmbId+'&id='+id+'&leaveTypeId=0';     		
	}
</script>
